<template>
<div>
  <div style="background-color: #f2f2f2">
    <div class="jz pad_15_0" style="width: 1200px;min-width: 1200px">
      <span class="fz_30" style="color: #cf1500">图说</span>
      <span class="fz_24 mag_l-10">关注、解读正在发生的事儿</span>
    </div>
  </div>
  <div class="jz" style="width: 1200px;min-width: 1200px">
    <div class="wh_33 disp topdq mag_t-20" v-for="(item,index) in tushuoList" :key="index">
      <div class="wh_9 jz fz_14" style="color: #4d4d4d">
        <div class="img_100">
          <img @click="itemList(item)" class="xsgb" height="240" :src="$store.state.imageUrltitle+item.image" alt="">
        </div>
        <div class="pad_15_0">
          <div @click="itemList(item)" class="ccsl_1 fz_24 xsgb" style="color: #0263c4">
            {{item.title}}
          </div>
        </div>
        <div class="pad_5_0"><div class="ccsl_1">
          <span>作者: {{item.author}}</span>
        </div></div>

        <div class="wh_f">
          <div class="flex_1 ccsl_1">来源: {{item.name}}</div>
          <div class="flex_1 ccsl_1">{{item.updatetime | date}}</div>
        </div>
      </div>
    </div>
  </div>
</div>
</template>

<script>
import {getArticle} from "@/api/api";

export default {
  name: "tushuo",
  data(){
    return{
      tushuoList:[]
    }
  },
  methods:{
    tushuo(e) {
      let params = {
        cid:e
      };
      getArticle(params).then(res => {
        if (res.status==200) {
          this.tushuoList = res.data.map((item)=>{
            return {...item,images:item.images.split(",")}
          })
        } else {
          console.log(res.msg)
        }
      });
    },
    itemList(e){
      this.$router.push({
        path:'imageList',
        query:{
          itemList:e,
          eid:e.id
        }
      })
    }
  },
  mounted() {
    this.tushuo(371)
  }
}
</script>

<style scoped>

</style>